sgdk: ym2612.h File Reference

sgdk

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

Defines | Functions
ym2612.h File Reference

YM2612 support. More...

Go to the source code of this file.

## Defines

#define | YM2612_BASEPORT 0xA04000

## Functions

void | YM2612_reset ()
| Reset YM2612 chip.
u8 | YM2612_read (const u16 port)
| Read YM2612 port.
void | YM2612_write (const u16 port, const u8 data)
| Write YM2612 port.
void | YM2612_writeSafe (const u16 port, const u8 data)
void | YM2612_writeReg (const u16 part, const u8 reg, const u8 data)
| Set YM2612 register value.
void | YM2612_writeRegSafe (const u16 part, const u8 reg, const u8 data)
void | YM2612_enableDAC ()
| Enable YM2612 DAC.
void | YM2612_disableDAC ()
| Disable YM2612 DAC.

## Detailed Description

YM2612 support.

Author:
  Stephane Dallongeville

Date:
  08/2011

This unit provides access to the YM2612 through the 68000 CPU.

## Define Documentation

#define YM2612_BASEPORT 0xA04000

YM2612 base port address.

## Function Documentation

u8 YM2612_read | ( | const u16 | port | ) |

Read YM2612 port.

Parameters:

  port | Port number (0-3)

Returns:
  YM2612 port value.

Reading YM2612 always return YM2612 status (busy and timer flag) whatever is the port read.

void YM2612_write | ( | const u16 | port,
|  | const u8 | data
| ) |  |

Write YM2612 port.

Parameters:

  port | Port number (0-3)
  data | Data to write

This function does not perform busy check before writing to YM port.
See also YM2612_writeSafe().

void YM2612_writeReg | ( | const u16 | part,
|  | const u8 | reg,
|  | const u8 | data
| ) |  |

Set YM2612 register value.

Parameters:

  part | part number (0-1)
  reg | register number
  data | register value

This function does not perform busy check before writing to YM port.
See also YM2612_writeRegSafe().

void YM2612_writeRegSafe | ( | const u16 | part,
|  | const u8 | reg,
|  | const u8 | data
| ) |  |

Deprecated:
  Use YM2612_writeReg(..) method instead.

void YM2612_writeSafe | ( | const u16 | port,
|  | const u8 | data
| ) |  |

Deprecated:
  Use YM2612_write(..) method instead.

All Classes Files Functions Variables Typedefs Enumerations Defines